<table cellpadding='0' cellspacing='0' width='100%'><tr bgcolor='#e0e0e0'><td>
<!--
Actions: [
	<a href='javascript:process("add", "stale");' />add_stale</a>
	| <a href='javascript:process("add", "retired");' />add_retired</a>
]
-->
URLs: [
	<a href=''>refresh</a>
]
</table>

<!-- Include Tabber Script -->
<script type="text/javascript" src="import/tabber.js">
</script>
<link rel="stylesheet" type="text/css" href="import/tabber.css" />

<h2>Active Directory Cleanup</h2>

<div class="tabber">

<?php include "tabMain.php"; ?>
<?php include "tabState.php"; ?>
<?php include "tabExceptions.php"; ?>
<?php include "tabSettings.php"; ?>
<?php include "tabTodo.php"; ?>

</div>	<!-- end tabber div -->


<?php
/*
echo "<h2>Active Directory Cleanup</h2>\n";
//echo "<table id='basic' cellspacing='0'>\n";
echo "<table id='$css_table_id' cellspacing='0'>\n";
echo "<caption>Instances:</caption>\n";
echo "<thead>\n";
echo "<tr>\n";
echo "<th scope='col'>Id\n";
echo "<th scope='col'>Style\n";
echo "<th scope='col'>State\n";
echo "<th scope='col'>Days\n";
echo "<th scope='col'>Start Node\n";
echo "<th scope='col'>Stale DN\n";
echo "<th scope='col'>Track_Id\n";
echo "<th scope='col'>Action\n";
echo "</thead>\n";
echo "<tbody>\n";
$query = "SELECT * FROM n_adc";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result)) {
	// if flagged as 'hidden', do not display
	if($row["hidden"]) {
		continue;
	}
	if($row["state"] == 3) {
		continue;
	}
	$id = $row["id"];
	$state = $row["state"];
	$days = $row["days"];
	$style = $row["style"];
	$start_node = $row["start_node"];
	$stale_dn = $row["stale_dn"];
	$track_id = $row["track_id"];

	echo "<tr>\n";
	echo "<td>". $row["id"] ."\n";
	echo "<td>". $row["style"] ."\n";
	switch($row["state"]) {
	case 0:
		echo "<td>Pending\n";
		echo "<td align='center'>". $row["days"] ."\n";
		echo "<td>". $row["start_node"] ."\n";
		echo "<td>". $row["stale_dn"] ."\n";
		echo "<td align='center'>". $row["track_id"] ."\n";
		echo "<td nowrap>\n";
		echo "<a href='javascript:process(\"daily\", \"id=$id\");' />daily</a>\n";
		echo "<a href='javascript:process(\"next_state\", \"id=$id|state=$state\");' />next_state</a>\n";
		break;
	case 1:
		echo "<td align='center'>FirstRun\n";
		echo "<td>". $row["days"] ."\n";
		echo "<td>". $row["start_node"] ."\n";
		echo "<td>". $row["stale_dn"] ."\n";
		echo "<td align='center'>". $row["track_id"] ."\n";
		echo "<td nowrap>\n";
		echo "<a href='javascript:process(\"daily\", \"id=$id\");' />daily</a>\n";
		echo "<a href='javascript:process(\"next_state\", \"id=$id|state=$state\");' />next_state</a>\n";
		break;
	case 2:
		echo "<td align='center'>Active\n";
		echo "<td>". $row["days"] ."\n";
		echo "<td>". $row["start_node"] ."\n";
		echo "<td>". $row["stale_dn"] ."\n";
		echo "<td align='center'>". $row["track_id"] ."\n";
		echo "<td nowrap>\n";
		echo "<a href='javascript:process(\"daily\", \"id=$id\");' />daily</a>\n";
		echo "<a href='javascript:process(\"next_state\", \"id=$id|state=$state\");' />next_state</a>\n";
		break;
	case 3:
		echo "<td align='center'>Complete\n";
		echo "<td>". $row["days"] ."\n";
		echo "<td>". $row["start_node"] ."\n";
		echo "<td>". $row["stale_dn"] ."\n";
		echo "<td align='center'>". $row["track_id"] ."\n";
		echo "<td>&nbsp;\n";
		break;
	}
	// all states allow for log viewing
	echo "<a href='javascript:process(\"view_log\", \"id=0". ");' />view_log</a>\n";
}
echo "</tbody>\n";
echo "</table>\n";

include "showTaskList.php";

echo "<h3>Todo:</h3>";
echo "<table>\n";
echo "<tr><td>\n";
echo "<ul>\n";
echo "<li>Move to web-based so that everyone can see updated status at anytime.\n";
echo "<li>Implement 'view_log'.\n";
echo "<li>If an exception is changed to 'active=false', it should be removed from isException\n";
echo "<li>When adding, would be nice to specify Stale OU.\n";
echo "</ul>\n";
echo "</table>\n";

echo "<h3>Done:</h3>";
echo "<table>\n";
echo "<tr><td>\n";
echo "<ul>\n";
echo "<li>Process the exception isActive / days data properly.\n";
echo "<li>Auto-generate daily report\n";
echo "<li>Make report have ability to submit new exceptions in an easily processable way.\n";
echo "<li>Modify daily report to include collapsable, more organized sections (to be deleted, not to be deleted and a break down by section of why isPing, isException, etc...)\n";
echo "</ul>\n";
echo "</table>\n";
*/
?>
